1. Field of the Invention
This invention generally relates to the design of laser scanning systems for reading bar code symbols or similar indicia and, more particularly, to method of decoding a bar code which is possibly scanned at an angle or is poorly printed so that each scan may provide only a partial scan of the entire symbol.
2. Description of the Related Art
Various optical readers and optical scanning systems have been developed heretofore for reading bar code symbols appearing on a label or on the surface of an article. The bar code symbol itself is a coded pattern of indicia comprised of a series of bars of various widths spaced apart from one another to bound spaces of various widths, the bars and spaces having different light-reflecting characteristics. The readers and scanning systems electro-optically decode the symbol to multiple alphanumerical characters that are intended to be descriptive of the article or some characteristic thereof. Such characters are typically represented in digital form as an input to a data processing system for applications in point-of-sale processing, inventory control, and the like. Scanning systems of this general type have been disclosed, for example, in U.S. Pat. Nos. 4,251,798; 4,360,798; 4,369,361; 4,387,297; 4,409,470 and 4,460,120, all of which have been assigned to the same assignee as the instant application.
As disclosed in some of the above patents, one embodiment of such a scanning system resides, inter alia, in an emitting a light beam from a hand-held, portable scanning head supported by a user, and aiming the head, and more particularly, the light beam, at a symbol to be read. The scanner functions by repetitively scanning the light beam in a line across the symbol.
A portion of the reflected light which is reflected off the symbol is detected, and electronic circuitry or software decodes the electrical signal into a digital representation of the data represented by the symbol scanned.
A laser scanner includes a light source such as a gas laser or semiconductor laser that generates the light beam. The use of a semiconductor devices as the light source in scanner systems is especially desirable because of their small size, low cost and low power requirements. The laser beam is optically modified, typically by a lens, to form a beam spot of a certain size. It is preferred that the beam spot size be approximately the same as the minimum width between regions of different light reflectivity, i.e., the bars and spaces of the symbol.
The bar code symbols are formed from bars or elements typically rectangular in shape with a variety of possible widths. The specific arrangement of elements defines the character represented according to a set of rules and definitions specified by the code or "symbology" used. The relative size of the bars and spaces is determined by the type of coding used, as is the actual size of the bars and spaces. The number of characters per inch represented by the bar code symbol is referred to as the density of the symbol. To encode a desired sequence of characters, a collection of element arrangements are concatenated together to form the complete bar code symbol, with each character of the message being represented by its own corresponding group of elements. In some symbologies a unique "start" and "stop" character is used to indicate where the bar code begins and ends. A number of different bar code symbologies exist. These symbologies include UPC/EAN, Code 39, Code 128, Codabar, and Interleaved 2 of 5.
For the purpose of our discussion, characters recognized and defined by a symbology shall be referred to as legitimate characters, while characters not recognized and defined by that symbology are referred to as illegitimate characters. Thus, an arrangement of elements not decodable by a given symbology corresponds to an illegitimate character(s) for that symbology.
In order to increase the amount of data that can be represented or stored on a given amount of surface area, several new bar code symbologies have recently been developed. One of these new code standards, Code 49, introduces a "two-dimensional" concept by stacking rows of characters vertically instead of extending the bars horizontally. That is, there are several rows of bar and space patterns, instead of only one row. The structure of Code 49 is described in U.S. Pat. No. 4,794,239, which is hereby incorporated by reference.
A one-dimensional single-line scan, as ordinarily provided by hand-held readers, has disadvantages in reading these two dimensional bar codes; that is, the reader must be aimed at each row, individually. Likewise, the multiple-scan-line readers produce a number of scan lines at an angle to one another so these are not suitable for recognizing Code 49 type of two-dimensional symbols.
In the scanning systems known in the art, the light beam is directed by a lens or similar optical components along a light path toward a target that includes a bar code symbol on the surface. A scanning component such as a mirror is also disposed in the light path. The scanning component may either sweep the beam spot across the symbol and trace a scan line across and past the symbol, or scan the field of view of the scanner or do both. A scanner also includes a sensor or photodetector. The photodetector has a field of view which extends across and slightly past the symbol and functions to detect light reflected from the symbol. The analog electrical signal from the photodetector is first typically converted into a pulse width modulated digital signal, with the widths corresponding to the physical widths of the bars and spaces. Such a signal is then decoded according to the specific symbology into a binary representation of the data encoded in the symbol, and to the alphanumeric characters so represented.
The decoding process in known scanning systems usually work in the following way. The decoder receives the pulse with modulated digital signal from the scanner, algorithm attempts to decode the scan. If the start and stop characters and the characters between them in the scan were decoded successfully and completely, the decoding process terminates and an indicative of a successful read (such as an audible beep) is provided to the user. Otherwise, the decoder receives the next scan, performs another decode attempt on that scan, and so on, until a completely decoded scan is achieved or no more scans are available.
In the prior art, the attempt to decode a scan will fail if one or more characters in the sequence (including the start/stop characters) fail to be recognized as legitimate characters. The standard decoding algorithm does not save any results of partial decoding. As a consequence a variety of different bar codes including long bar code with short height, poorly printed bar codes, or a bar code seriously marred by extraneous markings are impossible or very hard to be decoded by the standard decoding algorithm and repeated attempts must be made by the user to reorient the scanning line over the symbol.
Upon registering a decode failure, bar code scanners and decoders known in the prior art discard the entire scanning data associated with a scan which does not decode, which for the purpose of our discussion in generic terms we describe as a distorted raw digital image. The entire scanning process described above is repeated until a scan is produced which is sufficiently free from noise or distortion so that the decoder can compare and match a legitimate character representation with the raw digital representation derived from the scan.
Such legitimate character representations are typically stored in or accessible to the decoder. However, such a method is time consuming, particularly in circumstances where it is difficult to obtain a scan which is not distorted.
Difficulties associated with the inability to read a bar code symbol or the erroneous reading of a bar code symbol are especially common in applications involving relatively long bar code messages, i.e., bar code symbols having numerous elements. As the length of the message increases, the number of elements and characters increases, thereby raising the likelihood that distortion will be introduced at some point during the scan. Accordingly, the bar code reader may scan the symbol numerous times before producing a raw digital image sufficiently free from distortion that it can be decoded.
Further, bar code symbols may contain printing defects which are arranged such that it is unlikely to obtain a single distortion free scan, i.e., valid characters cannot be produced and the bar code cannot be read. Additionally, the bar codes may be printed in a dot matrix style in which case the ability to read the bar codes depends on the resolution of the print. Using conventional methods of decoding, such bar code symbols are often unreadable since reading along any single scan line through the symbol would not result in a sequence of valid characters.
Laser scanners are not the only type of optical instrument capable of reading bar code symbols. Another type of optical reader is one which is operative being placed by the user in direct contact with the symbol to be read. Such readers typically incorporate a non-laser light source and detectors based upon charge coupled device (CCD) technology in which the size of the detector is larger than or substantially the same as the symbol to be read. Such scanners are lightweight and easy to use, but require substantially direct contact or placement of the reader on the symbol to enable the symbol to read. Such contact reading is a preferred mode of operation for some applications or as a matter of personal preference by the user. Contact or near contact reading may also be implemented in an appropriately designed laser scanner.